cmake_minimum_required(VERSION 2.8)
 
set(CMAKE_BUILD_TYPE Debug)

link_directories    (${CMAKE_SOURCE_DIR}/pantheios/lib)

project(easy-file-sharing)

add_library(udp SHARED
							core/udp/UDPThread.cpp
							core/udp/UDPPinger.cpp
							core/udp/UDPListener.cpp
)

add_library(tcp SHARED
							core/tcp/Socket.cpp
							core/tcp/TCPListener.cpp
							core/tcp/TCPListenerPlug.cpp
							core/tcp/Stream.cpp
							core/tcp/TCPMessenger.cpp
							core/tcp/TCPMessengerI.cpp
							core/tcp/TCPMessengerPlug.cpp
							core/tcp/TCPListenerSubscriber.cpp
							core/TCPMessageCounter.cpp		
)

add_library(file SHARED
							core/file-client/FileClient.cpp
							core/file-server/FileServer.cpp
							core/file-client/FileClientI.cpp
							core/file-server/FileServerI.cpp
							core/file-client/FileClientPlug.cpp
							core/file-server/FileServerPlug.cpp	
)

add_library(folder SHARED
							core/folder-manager/FolderManagerI.cpp
							core/folder-manager/FolderManagerPlug.cpp
							core/folder-manager/FolderManager.cpp
							core/folder-manager/FolderDescription.cpp
)

add_executable(efs			core/main.cpp
							#core/main_test_xml.cpp 
							#core/main_test_udp.cpp
								#core/main_test_folder.cpp
							#core/main_test_new_folder.cpp
							core/common/Settings.cpp 
							core/common/Utils.cpp
							core/common/XmlUtils.cpp
							core/common/ClientEntry.cpp
							core/common/ClientEntryList.cpp
							core/common/Lock.cpp
							core/common/MyIP.cpp
							core/common/PantheiosFrontend.cpp
							core/Launcher.cpp
															
							) 

include_directories (${PROJECT_SOURCE_DIR}/pantheios/include)
include_directories (${PROJECT_SOURCE_DIR}/stlsoft)

target_link_libraries(efs 	pthread 
							pantheios.1.core.gcc45
							pantheios.1.be.fprintf.gcc45
							pantheios.1.bec.fprintf.gcc45
							#pantheios.1.fe.all.gcc45
							pantheios.1.util.gcc45
							boost_program_options
							udp
							tcp
							file
							folder
							)

#add_definitions (-Wall -pedantic)
 
